﻿/// <reference path="jquery-ui-1.8.17.min.js" />
/// <reference path="jquery-1.7.1-vsdoc.js" />
/// <reference path="jquery-1.7.1.min.js" />

//show popup if take it success
function popupSuccess() {
    $("#dialog:ui-dialog").dialog("destroy");
    $("#dialog-modal").dialog({
        height: 140,
        resizable: false,
        modal: true,
        buttons: {
            "Ok": function() {
                $(this).dialog("close");
            }
        }
    });
}

function popupfail() {    
    $("#dialog:ui-dialog").dialog("destroy");
    $("#dialog-fail").dialog({
        height: 140,
        resizable: false,
        modal: true
    });
}

function popupRegistration() {
    $("#dialog_registration").dialog("destroy");
    $("#dialog_registration").dialog({
        height: 140,
        modal: true
    });
}

function popupSite(id) {
    var id = "#" + id;    
    $(id).dialog({
        height: 132,
        width: 309,
        resizable: false,
        draggable: false,
        modal: true,
        buttons: { "Ok": function () { $(this).dialog("close"); } }
    });
}
function popupdialogLogin(id){
    var id = "#" + id;
    $(id).dialog({
        height: 132,
        width: 309,
        resizable: true,
        draggable: false,
        modal: true        
    });
}
function popupForgotF(id) {
    var id = "#" + id;
    $(id).dialog({
        height: 132,
        width: 309,
        resizable: true,
        draggable: false,
        modal: true
    });
}

function popupForgotS(id) {
    var id = "#" + id;
    $(id).dialog({
        height: 132,
        width: 309,
        resizable: true,
        draggable: false,
        modal: true,
        close: function () {
            location.href = '/';
        },
        buttons: {
            "Ok": function () {
                $(this).dialog("close");
                location.href = '/';
            }
        }
    });
}

function popupRegister(id) {
    var id = "#" + id;
    $(id).dialog({
        height: 132,
        width: 319,
        resizable: false,
        draggable: false,
        modal: true,
        close: function () {
            location.href = '/';
        },
        buttons: {
            "Ok": function () {
                $(this).dialog("close");
                location.href = '/';
            }
        }
    });
}

function popupLogin(id) {
    $("#" + id).dialog({
        height: 132,
        width: 309,
        resizable: false,
        draggable: false,
        modal: true,
        close: function () {           
        },
        buttons: {
            "Ok": function () {
                $(this).dialog("close");                
            }
        }
    });
}
function popupContact(id) {
    $("#" + id).dialog({
        height: 124,
        width: 309,
        resizable: false,
        draggable: false,
        modal: true,
        buttons: {
            "Ok": function() {
                $(this).dialog("close");
                location.href = '/User/Contacts';
            }
        }
    });
}

function popupCreatedBomb(id) {
    $("#" + id).dialog({
        height: 132,
        width: 309,
        resizable: false,
        draggable: false,
        modal: true,
        buttons: {
            "Ok": function() {
                $(this).dialog("close");
                location.href = '/Bomb/Makebomb';
            }
        }
    });
}

function popupBetSlip(id,betDetail) {
    var id = "#" + id;
    $(id).dialog({
        height: 200,
        width: 350,
        resizable: false,
        draggable: true,
        modal: true,
        close: function () {
            $("#" + betDetail).removeClass('disable_point');
        }        
    });
}
//end
               